package com.itheima.homework4;

public class Demo_Factorial {
    public static void main(String[] args) {
        int i = factorial(10);
        System.out.println(i);
    }
    public static int factorial(int n){
        if(n==1){
            return 1;
        }
        return n*factorial(n-1);
    }
}
